package com.hex.ds.hdtp.core.inf.metadata.converter;

import com.hex.ds.hdtp.core.inf.metadata.entity.TableFieldsEntity;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.Map;

@Mapper(componentModel = "spring")
public interface ITdSqlResultMapper {

    @Mapping(source = "ColumnId", target = "columnId")
    @Mapping(source = "DataBaseName", target = "dataBaseName")
    @Mapping(source = "TableName", target = "tableName")
    @Mapping(source = "TableCommet", target = "tableCommet")
    @Mapping(source = "ColumnName", target = "columnName")
    @Mapping(source = "ColumnType", target = "columnType")
    @Mapping(source = "ColumnCommet", target = "columnCommet")
    @Mapping(source = "PartitioningColumn", target = "partitioningColumn")
    TableFieldsEntity toTableFieldsBean(Map<String, String> sqlResult);
}
